package com.android.webttest.Adapter;

import com.android.webttest.model.GoodComments;
import com.android.webttest.model.GoodCommentsPro;

import java.util.ArrayList;
import java.util.List;

public class SubCommentAdapter extends CommentAdapter {
    public SubCommentAdapter(List<GoodComments> subComments) {
        super(convertToProList(subComments));
    }

    private static List<GoodCommentsPro> convertToProList(List<GoodComments> comments) {
        List<GoodCommentsPro> proList = new ArrayList<>();
        for (GoodComments comment : comments) {
            proList.add(new GoodCommentsPro(comment, null)); // 没有子评论
        }
        return proList;
    }
}